﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using COM.OA.BLL;
using COM.OA.Entity;

public partial class rc_jh_plancontent : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        COM.OA.Entity.users loginuser = Session["loginuser"] as COM.OA.Entity.users;
        if (loginuser == null)
        {
            Response.Write("<script language='javascript'>parent.document.location.href='../login.aspx'</script>");
        }
        else
        {
            //取传递的参数
            int tid = Int32.Parse(this.Request.QueryString["toid"].ToString());

            string sql = "to_id='{0}'";
            sql = string.Format(sql, tid);
            IList<timeorder> tolist = timeorderBLL.Select(sql);
            if (tolist.Count == 1)
            {
                foreach (timeorder t in tolist)
                {
                    this.Response.Write("<br/><br/><table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td width='6' height='21'><img src='../images/sj/leftlin1.gif' width='6' height='21'></td><td width='936' bgcolor='#5AAE18'><div align='center'><div align='center' class='style42'><span class='style3 style2 style1 style16 style41'><span class='style3 style1 style16 style41'><strong>计 划 </strong></span></span><span class='style41'><strong>内 容</strong></span></div><span class='style1'></span></div></td><td width='6' height='21'><img src='../images/sj/rightlin1.gif' width='6' height='21'></td></tr></table>");
                    this.Response.Write("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td><table width='100%' border='0' cellpadding='0' cellspacing='1' bgcolor='#5AAE18'><tr><td height='185' bgcolor='#FFFFFF'><table width='99%' border='0' cellpadding='0' cellspacing='1' style='word-break:break-all;Width:fixed'><tr bgcolor='#FFFFFF'><td valign='top'><table width='100%' border='0' cellpadding='2' cellspacing='0'><tr><td style='word-break:break-all;Width:fixed'><div align='center'>");
                    this.Response.Write("<strong><span class='style40'>" + t.to_title + "</span></strong><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;安排日期:" + t.to_orderdate + "<br></div></td>");
                    this.Response.Write("</tr><tr><td><hr width='96%' size='1' color='#5AAE18'></td></tr></table>");
                    this.Response.Write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + t.to_content + "<span class='style37'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span>");
                    this.Response.Write("<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class='style37'>写入时间：" + t.to_sendtime + "</span></td></tr></table></td></tr></table></td></tr></table>");
                }
            }
        }
    }
}
